package demo.validator;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

public class UserValidator extends Validator {

	@Override
	protected void validate(Controller c) {
		this.validateInteger("id", 0, Integer.MAX_VALUE, "errorId", "非法的id");
	}

	@Override
	protected void handleError(Controller c) {
		//c.render("/error.html");
		c.render("/error.jsp");
	}

}
